<template>
    <a @click="setList">set list</a>
    <div style="width: 300px;height: 80px;">
        <sa-list-roll :list="list" :speed="params.speed" :delay="params.delay" :isInit="params.isInit" :liHeight="params.liHeight">
            <template #li="{item}">
                <span style="color:red">{{ item }}</span>
            </template>
        </sa-list-roll>
    </div>
</template>

<script lang="ts" setup>
import { ref, onMounted,defineProps } from 'vue';
let list = ref([
    1,2,3,4,5,6,7
])
let params = ref({
    speed:10,
    delay:2000,
    isInit:false,
    liHeight:40 //高度要和 父元素的高度 % == 0
})
let setList = () =>{
    list.value = ['一','二'];
    params.value.delay = 500;
}
</script>